﻿#ifndef APPSETTINGS_H
#define APPSETTINGS_H

#include <QObject>
#include <QDebug>
#include <QMutex>
#include <QSettings>

class AppSettings
{
public:
    static AppSettings& getInstance();

public:
    QString m_sqlite_dbUsername;
    QString m_sqlite_dbPwd;
    QString m_sqlite_dbDbname;

private:
    AppSettings();
    ~AppSettings();
    AppSettings(const AppSettings &settings)=delete;
    AppSettings operator=(const AppSettings &settings)=delete;
    void init();

private:
    static QMutex mutex;
    static QScopedPointer<AppSettings> instance;
    friend struct QScopedPointerDeleter<AppSettings>;
};

#endif // APPSETTINGS_H
